package com.capricornus.demo.service.user;

import com.capricornus.demo.model.Department;
import com.capricornus.demo.model.DepartmentTree;

import java.util.List;

public interface DepartmentService {

    /**
     * 树形展示查询
     * @return
     */
    List<DepartmentTree> selectDepartmentTreeList();



    /**
     * 根据部门编号查询部门详细信息
     * @param deptId
     * @return
     */
    Department selectDeptInfo(String deptId);

    /**
     * 获取上级部门信息
     * @param parentId
     * @return
     */
    Department getDeptName(String parentId);

    /**
     * 编辑部门信息
     * @param department
     * @return
     */
     int update(Department department);

    /**
     * 添加部门信息
     * @param department
     * @return
     */
     int insert(Department department);

    /**
     * 删除部门信息
     * @param departmentTree
     * @return
     */
     int deleteDepartmentId(Department department);

    /**
     *根据部门编码判断是否存在
     * @param deptCode
     * @return
     */
     int selectDepartmentId(String deptCode);

    /**
     * 树形展示查询
     * @return
     */
     List<Department> allDeptList();

//    /**
//     * 根据部门编码判断是否存在
//     * @param deptCode
//     * @return
//     */
//     boolean selectDepartmentExist(String deptCode);

}
